import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import Balance from '../components/Balance.vue'
import Transfer from '../components/Transfer.vue'
import Transactions from '../components/Transactions.vue'
import ChangePassword from '../components/ChangePassword.vue'
import Dashboard from '../components/Dashboard.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/balance',
    name: 'Balance',
    component: Balance,
  },
  {
    path: '/transfer',
    name: 'Transfer',
    component: Transfer,
  },
  {
    path: '/transactions',
    name: 'Transactions',
    component: Transactions,
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: Dashboard,
  },
  {
    path: '/change-password',
    name: 'ChangePassword',
    component: ChangePassword,
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router